/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test.services;

import javax.sql.DataSource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

/**
 *
 * @author hjhi
 */
@Service("savewfstdata")
public class ServiceSaveWfstData {

    ApplicationContext ac = new ClassPathXmlApplicationContext("//applicationContext.xml");
    DataSource dataSource = (DataSource) ac.getBean("dataSource");
    JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
    
    public boolean saveWfstData(String wktString){
        int id=1;
        int gid=1;
        int uid=1;
        String query="insert into user_data values (?,?,?,?)";
        Object[] parameters = new Object[]{uid,wktString,gid,id};
        return true;
    }
}
